<?php
/**
 * Created by PhpStorm.
 * User: changyifan
 * Date: 2018/1/26
 * Time: 下午3:51
 * 节模型
 */

namespace Home\Model;
use Think\Model\BaseModel;
class SectionModel extends BaseModel {
	
	protected $_scope = array(
		'method' => array(
			'where' => array('cha_id'=>''),
			'field' => array('sec_id','sec_order','sec_name')
		),
	);

    public function getSectionInfoListByAll(){
        $result = $this->select();

        if($result){
            return $result;
        }else{
            return array();
        }

    }
	public function getSectionInfoListWithCourseName($chapter_id){

        
        $result = $this-> scope('method',array('where'=>array('cha_id'=>$chapter_id))) -> select();
        if($result){
            return $result;
        }else{
            return array();
        }

    }
	
	
}





?>